
#include <QtGui/QMainWindow>
#include <QtGui>

class MyDialog : public QDialog {
Q_OBJECT
 public:
    MyDialog(QWidget *parent=0);
    bool checkFileConnection();
    int checkFileUser();
    int userId;

 protected:
     virtual void closeEvent(QCloseEvent *event);
 private slots:
     bool start();
     bool connect_ok();
     bool CreateTable ();
     bool CreateData ();
     bool resetConnect ();
private:
     QLabel *title;
     QComboBox *mode;
     QLineEdit *host;
     QLineEdit *dbname;
     QLineEdit *user;
     QLineEdit *password;
     QTextEdit *scr;
     QLineEdit *port;
     QPushButton *btnStart;
     QPushButton *btnConOk;
     QPushButton *btnConOtmena;
     QPushButton *btnCreateTables;
     QPushButton *btnCreateData;
     QPushButton *btnResetConnect;

};
